Vercel
API ReferenceChats

Get Preview URL

Returns the preview URL for a chat. If the preview isn't ready, it will return null. Poll this endpoint until preview is non-null.

GET/v2/chats/{chatId}/preview

Usage

TypeScript Example
import { v0 } from 'v0-sdk'const result = await v0.chats.getPreview({  chatId: 'chat_abc123',})console.log(result)

API Signature

Request

Path Parameters

chatId: string

The unique identifier of the chat.

Response

preview: object | null

The preview details, or null if the preview is still starting. Poll this endpoint until preview is non-null.

url: string

The preview URL for this chat.

token: string

A short-lived token for accessing the preview URL via the x-v0-preview-token header.

expiresAt: string

The ISO timestamp when token expires.

On this page